package cn.nn200433.mqtt.service;

import cn.nn200433.mqtt.config.MqttClientProperties;
import org.eclipse.paho.client.mqttv3.MqttMessage;

/**
 * mqtt处理程序
 *
 * @author nn200433
 * @date 2021-07-26 10:53:33
 */
public interface IMqttHandlerService {
    
    /**
     * 获取订阅主题
     *
     * @return {@link String }
     * @author nn200433
     */
    public String getSubscribeTopic();
    
    /**
     * 订阅消息到达处理
     *
     * @param mqttConfig mqtt配置
     * @param topic      主题
     * @param message    消息
     * @return
     * @throws Exception 异常
     * @author nn200433
     */
    public void subscribeMsgArrivedHandle(MqttClientProperties mqttConfig, String topic, MqttMessage message) throws Exception;

}
